home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch8e < prev    next >
Encoding:
Internet Message Format  |  1990-06-08  |  58.6 KB

  1. Path: uunet!snorkelwacker!tut.cis.ohio-state.edu!ucsd!ogicse!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i023:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch8e
  5. Message-ID: <5731@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 17:51:49 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2258
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 23
  13. Archive-name: NetHack3/Patch8e
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 5 (of 24)."
  25. # Contents:  UPDATE8 patch8.08
  26. # Wrapped by billr@saab on Mon Jun  4 15:27:15 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'UPDATE8' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'UPDATE8'\"
  30. else
  31. echo shar: Extracting \"'UPDATE8'\" \(2545 characters\)
  32. sed "s/^X//" >'UPDATE8' <<'END_OF_FILE'
  33. XFrom @RELAY.CS.NET,@central.cis.upenn.edu:izchak@linc.cis.upenn.edu Sun Jun  3 19:07:16 1990
  34. XReceived: from tekred.CNA.TEK.COM by saab.CNA.TEK.COM (3.2/6.24)
  35. X    id AA19831; Sun, 3 Jun 90 19:07:15 PDT
  36. XReceived: by tekred.CNA.TEK.COM (5.51/6.24)
  37. X    id AA07744; Sun, 3 Jun 90 19:04:46 PDT
  38. XReceived: by tektronix.TEK.COM (5.51/7.1)
  39. X    id AA19147; Sun, 3 Jun 90 19:09:13 PDT
  40. XReceived: from  by zephyr.ENS.TEK.COM (4.1/7.1)
  41. X    id AB19260; Sun, 3 Jun 90 19:03:29 PDT
  42. XReceived: from relay.cs.net by RELAY.CS.NET id aa02627; 3 Jun 90 21:57 EDT
  43. XReceived: from central.cis.upenn.edu by RELAY.CS.NET id aa02050;
  44. X          3 Jun 90 21:58 EDT
  45. XReceived: from LINC.CIS.UPENN.EDU by central.cis.upenn.edu
  46. X    id AA24573; Sun, 3 Jun 90 21:58:54 -0400
  47. XReturn-Path: <izchak@linc.cis.upenn.edu>
  48. XReceived: by linc.cis.upenn.edu
  49. X    id AA04476; Sun, 3 Jun 90 21:58:14 EDT
  50. XDate: Sun, 3 Jun 90 21:58:14 EDT
  51. XFrom: Izchak Miller <izchak@linc.cis.upenn.edu>
  52. XPosted-Date: Sun, 3 Jun 90 21:58:14 EDT
  53. XMessage-Id: <9006040158.AA04476@linc.cis.upenn.edu>
  54. XTo: billr@saab.CNA.TEK.COM
  55. XSubject: UPDATE8
  56. XStatus: O
  57. X
  58. XThis patch is devoted to bugfixes and accommodations for more versions of
  59. Xthe newer ports.
  60. X
  61. XThe VMS port should now compile with both VAXC and GNUC and install more
  62. Xeasily under a variety of OS versions, thanks to Joshua Delahunty and Pat
  63. XRankin.
  64. X
  65. XA number of strange interactions in the Macintosh-specific code have been
  66. Xcleaned up.
  67. X
  68. XThe MSDOS overlay manager was debugged, and the overlay assignments and macro
  69. Xnames straightened out, so the result should be both faster and more stable
  70. Xthan previous versions.  See the new file Install.ovl and various files in
  71. Xthe others directory for more information.
  72. X
  73. XThe Amiga port now specifies addressing modes for many external variables,
  74. Xwhich should make its executable smaller and faster as well.
  75. X
  76. X
  77. XThe biggest externally visible change separates DECgraphics and IBMgraphics
  78. Xfrom the general graphics-setting code, and makes them selectable on the
  79. Xcommand line.
  80. X
  81. XOnce again, existing saved games and bones files should be discarded (or the
  82. Xupdate postponed until they are gone).
  83. X
  84. XA number of reasonably simple bugs are no more, although some screen update
  85. Xoddities are postponed to 3.1.  Among the dead are problems with shops on
  86. Xbones levels, renaming artifacts, kicking non-objects, winning gem treatment,
  87. Xlevel bounds checking and monster filling, mimic appearances, taking items
  88. Xout of containers, monster interiors and inventories, and guard behavior.
  89. XVarious other things were changed to be consistent with similar situations.
  90. X
  91. X
  92. END_OF_FILE
  93. if test 2545 -ne `wc -c <'UPDATE8'`; then
  94.     echo shar: \"'UPDATE8'\" unpacked with wrong size!
  95. fi
  96. # end of 'UPDATE8'
  97. fi
  98. if test -f 'patch8.08' -a "${1}" != "-c" ; then 
  99.   echo shar: Will not clobber existing file \"'patch8.08'\"
  100. else
  101. echo shar: Extracting \"'patch8.08'\" \(52966 characters\)
  102. sed "s/^X//" >'patch8.08' <<'END_OF_FILE'
  103. X*** src/Old/spell.c    Sun Jun  3 14:12:22 1990
  104. X--- src/spell.c    Sat May 26 23:01:54 1990
  105. X***************
  106. X*** 6,13 ****
  107. X  
  108. X  #include "hack.h"
  109. X  #ifdef SPELLS
  110. X! static schar delay;        /* moves left for this spell */
  111. X! static struct obj *book;    /* last/current book being xscribed */
  112. X  
  113. X  #ifdef HARD
  114. X  #define spelluses(spell)    spl_book[spell-1].sp_uses
  115. X--- 6,13 ----
  116. X  
  117. X  #include "hack.h"
  118. X  #ifdef SPELLS
  119. X! static schar NEARDATA delay;        /* moves left for this spell */
  120. X! static struct obj NEARDATA *book;    /* last/current book being xscribed */
  121. X  
  122. X  #ifdef HARD
  123. X  #define spelluses(spell)    spl_book[spell-1].sp_uses
  124. X***************
  125. X*** 17,22 ****
  126. X--- 17,27 ----
  127. X  #define spellname(spell)    objects[spl_book[spell-1].sp_id].oc_name
  128. X  #define spellid(spell)        spl_book[spell-1].sp_id
  129. X  
  130. X+ static void FDECL(cursed_book, (int));
  131. X+ STATIC_PTR int NDECL(learn);
  132. X+ static int NDECL(getspell);
  133. X+ static char FDECL(spellet, (int));
  134. X+ 
  135. X  static void
  136. X  cursed_book(lev)
  137. X      register int    lev;
  138. X***************
  139. X*** 77,85 ****
  140. X      return;
  141. X  }
  142. X  
  143. X! #ifndef OVERLAY
  144. X! static 
  145. X! #endif
  146. X  int
  147. X  learn()
  148. X  {
  149. X--- 82,88 ----
  150. X      return;
  151. X  }
  152. X  
  153. X! STATIC_PTR
  154. X  int
  155. X  learn()
  156. X  {
  157. X***************
  158. X*** 348,353 ****
  159. X--- 351,362 ----
  160. X      case SPE_FINGER_OF_DEATH:
  161. X      case SPE_LIGHT:
  162. X      case SPE_DETECT_UNSEEN:
  163. X+ #ifdef MACOS
  164. X+         if (pseudo->otyp == SPE_DIG)
  165. X+         {
  166. X+             segments |= SEG_SPELL;
  167. X+         }
  168. X+ #endif
  169. X          if (!(objects[pseudo->otyp].bits & NODIR)) {
  170. X              if (atme) u.dx = u.dy = u.dz = 0;
  171. X              else (void) getdir(1);
  172. X*** src/Old/steal.c    Sun Jun  3 14:12:42 1990
  173. X--- src/steal.c    Thu May 31 22:13:47 1990
  174. X***************
  175. X*** 4,10 ****
  176. X--- 4,13 ----
  177. X  
  178. X  #include "hack.h"
  179. X  
  180. X+ STATIC_DCL int NDECL(stealarm);
  181. X+ 
  182. X  #ifdef OVLB
  183. X+ static const char * FDECL(equipname, (struct obj *));
  184. X  
  185. X  static const char *
  186. X  equipname(otmp)
  187. X***************
  188. X*** 63,72 ****
  189. X  unsigned int stealoid;        /* object to be stolen */
  190. X  unsigned int stealmid;        /* monster doing the stealing */
  191. X  
  192. X! #ifndef OVERLAY
  193. X! static 
  194. X! #endif
  195. X! int
  196. X  stealarm(){
  197. X      register struct monst *mtmp;
  198. X      register struct obj *otmp;
  199. X--- 66,72 ----
  200. X  unsigned int stealoid;        /* object to be stolen */
  201. X  unsigned int stealmid;        /* monster doing the stealing */
  202. X  
  203. X! STATIC_OVL int
  204. X  stealarm(){
  205. X      register struct monst *mtmp;
  206. X      register struct obj *otmp;
  207. X***************
  208. X*** 75,82 ****
  209. X        if(otmp->o_id == stealoid) {
  210. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  211. X            if(mtmp->m_id == stealmid) {
  212. X            freeinv(otmp);
  213. X!           pline("%s steals %s!", Blind ? "It" : Monnam(mtmp), doname(otmp));
  214. X            mpickobj(mtmp,otmp);
  215. X            mtmp->mflee = 1;
  216. X            rloc(mtmp);
  217. X--- 75,84 ----
  218. X        if(otmp->o_id == stealoid) {
  219. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  220. X            if(mtmp->m_id == stealmid) {
  221. X+           if(otmp->unpaid) subfrombill(otmp);
  222. X            freeinv(otmp);
  223. X!           pline("%s steals %s!", Blind ? "It" : 
  224. X!                     Monnam(mtmp), doname(otmp));
  225. X            mpickobj(mtmp,otmp);
  226. X            mtmp->mflee = 1;
  227. X            rloc(mtmp);
  228. X*** src/Old/termcap.c    Sun Jun  3 14:13:01 1990
  229. X--- src/termcap.c    Sat Jun  2 19:46:20 1990
  230. X***************
  231. X*** 19,35 ****
  232. X  short    ospeed = 0;    /* gets around "not defined" error message */
  233. X  #endif
  234. X  
  235. X- #ifdef ASCIIGRAPH
  236. X  
  237. X- #ifdef OVLB
  238. X- 
  239. X- boolean IBMgraphics = FALSE;
  240. X- 
  241. X- #endif /* OVLB */
  242. X- 
  243. X- #endif
  244. X- 
  245. X- 
  246. X  #ifdef MICROPORT_286_BUG
  247. X  #define Tgetstr(key) (tgetstr(key,tbuf))
  248. X  #else
  249. X--- 19,25 ----
  250. X***************
  251. X*** 36,66 ****
  252. X  #define Tgetstr(key) (tgetstr(key,&tbufptr))
  253. X  #endif /* MICROPORT_286_BUG **/
  254. X  
  255. X! OSTATIC void FDECL(nocmov, (int, int));
  256. X  #ifdef TEXTCOLOR
  257. X  # ifdef TERMLIB
  258. X  static void NDECL(init_hilite);
  259. X  # endif
  260. X  #endif
  261. X  
  262. X! VSTATIC char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
  263. X! VSTATIC char *VS, *VE, *US, *UE;
  264. X! VSTATIC char *MR, *ME;
  265. X  #if 0
  266. X! VSTATIC char *MB, *MH;
  267. X! VSTATIC char *MD;     /* may already be in use below */
  268. X  #endif
  269. X  #ifdef TERMLIB
  270. X  # ifdef TEXTCOLOR
  271. X! VSTATIC char *MD;
  272. X  # endif
  273. X! VSTATIC int SG;
  274. X  #ifdef OVLB
  275. X! XSTATIC char PC = '\0';
  276. X  #else /* OVLB */
  277. X! OSTATIC char PC;
  278. X  #endif /* OVLB */
  279. X! VSTATIC char tbuf[512];
  280. X  #endif
  281. X  
  282. X  #ifdef OVLB
  283. X--- 26,58 ----
  284. X  #define Tgetstr(key) (tgetstr(key,&tbufptr))
  285. X  #endif /* MICROPORT_286_BUG **/
  286. X  
  287. X! STATIC_DCL void FDECL(nocmov, (int, int));
  288. X  #ifdef TEXTCOLOR
  289. X  # ifdef TERMLIB
  290. X+ #  ifdef OVLB
  291. X  static void NDECL(init_hilite);
  292. X+ #  endif /* OVLB */
  293. X  # endif
  294. X  #endif
  295. X  
  296. X! STATIC_VAR char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
  297. X! STATIC_VAR char *VS, *VE, *US, *UE;
  298. X! STATIC_VAR char *MR, *ME;
  299. X  #if 0
  300. X! STATIC_VAR char *MB, *MH;
  301. X! STATIC_VAR char *MD;     /* may already be in use below */
  302. X  #endif
  303. X  #ifdef TERMLIB
  304. X  # ifdef TEXTCOLOR
  305. X! STATIC_VAR char *MD;
  306. X  # endif
  307. X! STATIC_VAR int SG;
  308. X  #ifdef OVLB
  309. X! STATIC_OVL char PC = '\0';
  310. X  #else /* OVLB */
  311. X! STATIC_DCL char PC;
  312. X  #endif /* OVLB */
  313. X! STATIC_VAR char tbuf[512];
  314. X  #endif
  315. X  
  316. X  #ifdef OVLB
  317. X***************
  318. X*** 68,74 ****
  319. X  #endif /* OVLB */
  320. X  
  321. X  #ifndef TERMLIB
  322. X! VSTATIC char tgotobuf[20];
  323. X  # ifdef TOS
  324. X  #define tgoto(fmt, x, y)    (Sprintf(tgotobuf, fmt, y+' ', x+' '), tgotobuf)
  325. X  # else
  326. X--- 60,66 ----
  327. X  #endif /* OVLB */
  328. X  
  329. X  #ifndef TERMLIB
  330. X! STATIC_VAR char tgotobuf[20];
  331. X  # ifdef TOS
  332. X  #define tgoto(fmt, x, y)    (Sprintf(tgotobuf, fmt, y+' ', x+' '), tgotobuf)
  333. X  # else
  334. X***************
  335. X*** 101,147 ****
  336. X      (void) memcpy((genericptr_t) showsyms, 
  337. X          (genericptr_t) defsyms, sizeof showsyms);
  338. X  
  339. X- #ifdef ASCIIGRAPH
  340. X-     /*
  341. X-      * If we're on an IBM box, default to the nice IBM Extended ASCII
  342. X-      * line-drawing characters (codepage 437).
  343. X-      *
  344. X-      * OS/2 defaults to a multilingual character set (codepage 850,
  345. X-      * corresponding to the ISO 8859 character set.  We should probably
  346. X-      * do a VioSetCp() call to set the codepage to 437.
  347. X-      *
  348. X-      * Someday we should do a full terminfo(4) check for ACS forms
  349. X-      * characters.
  350. X-      */
  351. X- # if !defined(MSDOS) || defined(DECRAINBOW) || defined(OS2)
  352. X- #  ifdef TERMLIB
  353. X-     if (strncmp("AT", term, 2) == 0)
  354. X- #  endif
  355. X- # endif
  356. X-     {
  357. X-         IBMgraphics = TRUE;
  358. X-         showsyms[S_vwall] = 0xb3;    /* meta-3, vertical rule */
  359. X-         showsyms[S_hodoor] = 0xb3;
  360. X-         showsyms[S_hwall] = 0xc4;    /* meta-D, horizontal rule */
  361. X-         showsyms[S_vodoor] = 0xc4;
  362. X-         showsyms[S_tlcorn] = 0xda;    /* meta-Z, top left corner */
  363. X-         showsyms[S_trcorn] = 0xbf;    /* meta-?, top right corner */
  364. X-         showsyms[S_blcorn] = 0xc0;    /* meta-@, bottom left */
  365. X-         showsyms[S_brcorn] = 0xd9;    /* meta-Y, bottom right */
  366. X-         showsyms[S_crwall] = 0xc5;    /* meta-E, cross */
  367. X-         showsyms[S_tuwall] = 0xc1;    /* meta-A, T up */
  368. X-         showsyms[S_tdwall] = 0xc2;    /* meta-B, T down */
  369. X-         showsyms[S_tlwall] = 0xb4;    /* meta-4, T left */
  370. X-         showsyms[S_trwall] = 0xc3;    /* meta-C, T right */
  371. X-         showsyms[S_vbeam] = 0xb3;    /* meta-3, vertical rule */
  372. X-         showsyms[S_hbeam] = 0xc4;    /* meta-D, horizontal rule */
  373. X-         showsyms[S_room] = 0xfa;    /* meta-z, centered dot */
  374. X-         showsyms[S_ndoor] = 0xfa;
  375. X-         showsyms[S_pool] = 0xf7;    /* meta-w, approx. equals */
  376. X-         showsyms[S_hodoor] = 0xfe;    /* meta-~, small centered square */
  377. X-         showsyms[S_vodoor] = 0xfe;
  378. X-     }
  379. X- #endif /* ASCIIGRAPH */
  380. X  
  381. X  #ifdef TERMLIB
  382. X      if(!term)
  383. X--- 93,98 ----
  384. X***************
  385. X*** 245,251 ****
  386. X          /* strictly, SE should be 2, and UE should be 24,
  387. X             but we can't trust all ANSI emulators to be
  388. X             that complete.  -3. */
  389. X! #   if !defined(MSDOS) || defined(DECRAINBOW)
  390. X          AS = "\016";
  391. X          AE = "\017";
  392. X  #   endif
  393. X--- 196,202 ----
  394. X          /* strictly, SE should be 2, and UE should be 24,
  395. X             but we can't trust all ANSI emulators to be
  396. X             that complete.  -3. */
  397. X! #   if !defined(MSDOS) || defined(TERMLIB)
  398. X          AS = "\016";
  399. X          AE = "\017";
  400. X  #   endif
  401. X***************
  402. X*** 394,410 ****
  403. X  {
  404. X      xputs(TI);
  405. X      xputs(VS);
  406. X! #ifdef DECRAINBOW
  407. X!     /* Select normal ASCII and line drawing character sets.
  408. X!      */
  409. X!     if (flags.DECRainbow) {
  410. X!         xputs("\033(B\033)0");
  411. X!         if (!AS) {
  412. X!             AS = "\016";
  413. X!             AE = "\017";
  414. X!         }
  415. X      }
  416. X- #endif /* DECRAINBOW */
  417. X  }
  418. X  
  419. X  void
  420. X--- 345,361 ----
  421. X  {
  422. X      xputs(TI);
  423. X      xputs(VS);
  424. X!     if (flags.DECgraphics) {
  425. X!         /* select the line-drawing character set as the alternate
  426. X!          * character set
  427. X!          * do not select NA ASCII as the primary character set
  428. X!          * since people may reasonably be using the UK set
  429. X!          */
  430. X!         xputs("\033)0");
  431. X!         /* 'as' and 'ae' are missing from some termcaps */
  432. X!         if (!AS) AS = "\016";  /* ^N */
  433. X!         if (!AE) AE = "\017";  /* ^O */
  434. X      }
  435. X  }
  436. X  
  437. X  void
  438. X***************
  439. X*** 417,422 ****
  440. X--- 368,376 ----
  441. X  
  442. X  /* Cursor movements */
  443. X  
  444. X+ #endif /* OVLB */
  445. X+ #ifdef OVL0
  446. X+ 
  447. X  #ifdef CLIPPING
  448. X  /* if (x,y) is currently viewable, move the cursor there and return TRUE */
  449. X  boolean
  450. X***************
  451. X*** 432,437 ****
  452. X--- 386,393 ----
  453. X  }
  454. X  #endif
  455. X  
  456. X+ #endif /* OVLB */
  457. X+ #ifdef OVLB
  458. X  void
  459. X  curs(x, y)
  460. X  register int x, y;    /* not xchar: perhaps xchar is unsigned and
  461. X***************
  462. X*** 457,464 ****
  463. X  
  464. X  #endif /* OVLB */
  465. X  #ifdef OVL0
  466. X  
  467. X! XSTATIC void
  468. X  nocmov(x, y)
  469. X  int x,y;
  470. X  {
  471. X--- 413,425 ----
  472. X  
  473. X  #endif /* OVLB */
  474. X  #ifdef OVL0
  475. X+ /* Note to OVLx tinkerers.  The placement of this overlay controls the location
  476. X+    of the function xputc().  This function is not currnently in trampoli.[ch]
  477. X+    files for what is deemed to be performance reasons.  If this define is moved
  478. X+    and or xputc() is taken out of the ROOT overlay, then action must be taken
  479. X+    in trampoli.[ch]. */
  480. X  
  481. X! STATIC_OVL void
  482. X  nocmov(x, y)
  483. X  int x,y;
  484. X  {
  485. X***************
  486. X*** 518,523 ****
  487. X--- 479,485 ----
  488. X      curx = x;
  489. X  }
  490. X  
  491. X+ /* See note at OVLx ifdef above.   xputc() is a special function. */
  492. X  void
  493. X  xputc(c)
  494. X  char c;
  495. X***************
  496. X*** 634,639 ****
  497. X--- 596,604 ----
  498. X      if(ME) xputs(ME);
  499. X  }
  500. X  
  501. X+ #endif /* OVL0 */
  502. X+ #ifdef OVLB
  503. X+ 
  504. X  void
  505. X  backsp()
  506. X  {
  507. X***************
  508. X*** 647,652 ****
  509. X--- 612,620 ----
  510. X      (void) putchar('\007');        /* curx does not change */
  511. X      (void) fflush(stdout);
  512. X  }
  513. X+ 
  514. X+ #endif /* OVLB */
  515. X+ #ifdef OVL0
  516. X  
  517. X  #ifdef ASCIIGRAPH
  518. X  void
  519. X*** src/Old/timeout.c    Sun Jun  3 14:13:33 1990
  520. X--- src/timeout.c    Mon May 28 15:47:16 1990
  521. X***************
  522. X*** 4,18 ****
  523. X  
  524. X  #include    "hack.h"
  525. X  
  526. X! #ifdef OVERLAY
  527. X! extern void NDECL(stoned_dialog), NDECL(vomiting_dialog), NDECL(choke_dialog);
  528. X! extern void FDECL(hatch_it, (struct obj*));
  529. X! #endif
  530. X  
  531. X  #ifdef OVLB
  532. X  
  533. X  /* He is being petrified - dialogue by inmet!tower */
  534. X! static const char *stoned_texts[] = {
  535. X      "You are slowing down.",        /* 5 */
  536. X      "Your limbs are stiffening.",        /* 4 */
  537. X      "Your limbs have turned to stone.",    /* 3 */
  538. X--- 4,18 ----
  539. X  
  540. X  #include    "hack.h"
  541. X  
  542. X! STATIC_DCL void NDECL(stoned_dialogue);
  543. X! STATIC_DCL void NDECL(vomiting_dialogue);
  544. X! STATIC_DCL void NDECL(choke_dialogue);
  545. X! STATIC_DCL void FDECL(hatch_it, (struct obj*));
  546. X  
  547. X  #ifdef OVLB
  548. X  
  549. X  /* He is being petrified - dialogue by inmet!tower */
  550. X! static const char NEARDATA *stoned_texts[] = {
  551. X      "You are slowing down.",        /* 5 */
  552. X      "Your limbs are stiffening.",        /* 4 */
  553. X      "Your limbs have turned to stone.",    /* 3 */
  554. X***************
  555. X*** 20,26 ****
  556. X      "You are a statue."            /* 1 */
  557. X  };
  558. X  
  559. X! XSTATIC void
  560. X  stoned_dialogue() {
  561. X      register long i = (Stoned & TIMEOUT);
  562. X  
  563. X--- 20,26 ----
  564. X      "You are a statue."            /* 1 */
  565. X  };
  566. X  
  567. X! STATIC_OVL void
  568. X  stoned_dialogue() {
  569. X      register long i = (Stoned & TIMEOUT);
  570. X  
  571. X***************
  572. X*** 33,39 ****
  573. X  }
  574. X  
  575. X  /* He is getting sicker and sicker prior to vomiting */
  576. X! static const char *vomiting_texts[] = {
  577. X      "You are feeling mildly nauseous.",    /* 11 */
  578. X      "You feel slightly confused.",        /* 8 */
  579. X      "You can't seem to think straight.",    /* 5 */
  580. X--- 33,39 ----
  581. X  }
  582. X  
  583. X  /* He is getting sicker and sicker prior to vomiting */
  584. X! static const char NEARDATA *vomiting_texts[] = {
  585. X      "You are feeling mildly nauseous.",    /* 11 */
  586. X      "You feel slightly confused.",        /* 8 */
  587. X      "You can't seem to think straight.",    /* 5 */
  588. X***************
  589. X*** 41,47 ****
  590. X      "You suddenly vomit!"            /* 0 */
  591. X  };
  592. X  
  593. X! XSTATIC void
  594. X  vomiting_dialogue() {
  595. X      register long i = (Vomiting & TIMEOUT) / 3L;
  596. X  
  597. X--- 41,47 ----
  598. X      "You suddenly vomit!"            /* 0 */
  599. X  };
  600. X  
  601. X! STATIC_OVL void
  602. X  vomiting_dialogue() {
  603. X      register long i = (Vomiting & TIMEOUT) / 3L;
  604. X  
  605. X***************
  606. X*** 58,64 ****
  607. X      }
  608. X  }
  609. X  
  610. X! static const char *choke_texts[] = {
  611. X      "You find it hard to breathe.",
  612. X      "You're gasping for air.",
  613. X      "You can no longer breathe.",
  614. X--- 58,64 ----
  615. X      }
  616. X  }
  617. X  
  618. X! static const char NEARDATA *choke_texts[] = {
  619. X      "You find it hard to breathe.",
  620. X      "You're gasping for air.",
  621. X      "You can no longer breathe.",
  622. X***************
  623. X*** 66,72 ****
  624. X      "You suffocate."
  625. X  };
  626. X  
  627. X! XSTATIC void
  628. X  choke_dialogue()
  629. X  {
  630. X      register long i = (Strangled & TIMEOUT);
  631. X--- 66,72 ----
  632. X      "You suffocate."
  633. X  };
  634. X  
  635. X! STATIC_OVL void
  636. X  choke_dialogue()
  637. X  {
  638. X      register long i = (Strangled & TIMEOUT);
  639. X***************
  640. X*** 208,214 ****
  641. X  #endif /* OVL0 */
  642. X  #ifdef OVLB
  643. X  
  644. X! XSTATIC void
  645. X  hatch_it(otmp)        /* hatch the egg "otmp" if possible */
  646. X  register struct obj *otmp;
  647. X  {
  648. X--- 208,214 ----
  649. X  #endif /* OVL0 */
  650. X  #ifdef OVLB
  651. X  
  652. X! STATIC_OVL void
  653. X  hatch_it(otmp)        /* hatch the egg "otmp" if possible */
  654. X  register struct obj *otmp;
  655. X  {
  656. X***************
  657. X*** 238,253 ****
  658. X  
  659. X  #ifdef POLYSELF
  660. X          if (yours) {
  661. X              pline("Its cries sound like \"%s.\"",
  662. X              flags.female ? "mommy" : "daddy");
  663. X!             (void) tamedog(mtmp, (struct obj *)0);
  664. X              mtmp->mtame = 20;
  665. X              return;
  666. X          }
  667. X  #endif
  668. X          if(mtmp->data->mlet == S_DRAGON) {
  669. X              verbalize("Gleep!");        /* Mything eggs :-) */
  670. X!             (void) tamedog(mtmp, (struct obj *)0);
  671. X          }
  672. X          }
  673. X      }
  674. X--- 238,267 ----
  675. X  
  676. X  #ifdef POLYSELF
  677. X          if (yours) {
  678. X+             struct monst *mtmp2;
  679. X+ 
  680. X              pline("Its cries sound like \"%s.\"",
  681. X              flags.female ? "mommy" : "daddy");
  682. X!             if (mtmp2 = tamedog(mtmp, (struct obj *)0))
  683. X!             mtmp = mtmp2;
  684. X              mtmp->mtame = 20;
  685. X+             while(otmp = (mtmp->minvent)) {
  686. X+             mtmp->minvent = otmp->nobj;
  687. X+             free((genericptr_t)otmp);
  688. X+             }
  689. X              return;
  690. X          }
  691. X  #endif
  692. X          if(mtmp->data->mlet == S_DRAGON) {
  693. X+             struct monst *mtmp2;
  694. X+ 
  695. X              verbalize("Gleep!");        /* Mything eggs :-) */
  696. X!             if (mtmp2 = tamedog(mtmp, (struct obj *)0))
  697. X!             mtmp = mtmp2;
  698. X!             while(otmp = (mtmp->minvent)) {
  699. X!             mtmp->minvent = otmp->nobj;
  700. X!             free((genericptr_t)otmp);
  701. X!             }
  702. X          }
  703. X          }
  704. X      }
  705. X*** src/Old/topl.c    Sun Jun  3 14:13:51 1990
  706. X--- src/topl.c    Sat May 26 22:43:09 1990
  707. X***************
  708. X*** 5,16 ****
  709. X  #define NEED_VARARGS /* Uses ... */    /* comment line for pre-compiled headers */
  710. X  #include "hack.h"
  711. X  
  712. X! VSTATIC char toplines[BUFSIZ];
  713. X  
  714. X  #ifndef OVLB
  715. X! OSTATIC boolean no_repeat;
  716. X  #else /* OVLB */
  717. X! XSTATIC boolean no_repeat = FALSE;
  718. X  #endif /* OVLB */
  719. X  
  720. X  extern xchar tlx, tly;
  721. X--- 5,16 ----
  722. X  #define NEED_VARARGS /* Uses ... */    /* comment line for pre-compiled headers */
  723. X  #include "hack.h"
  724. X  
  725. X! STATIC_VAR char NEARDATA toplines[BUFSIZ];
  726. X  
  727. X  #ifndef OVLB
  728. X! STATIC_DCL boolean no_repeat;
  729. X  #else /* OVLB */
  730. X! STATIC_OVL boolean no_repeat = FALSE;
  731. X  #endif /* OVLB */
  732. X  
  733. X  extern xchar tlx, tly;
  734. X***************
  735. X*** 18,26 ****
  736. X  xchar tlx, tly;            /* set by pline; used by addtopl */
  737. X  #endif /* OVLB */
  738. X  
  739. X! OSTATIC void NDECL(redotoplin);
  740. X! OSTATIC void FDECL(xmore,(const char *));
  741. X! VSTATIC struct topl {
  742. X      struct topl *next_topl;
  743. X      char *topl_text;
  744. X  } *old_toplines, *last_redone_topl;
  745. X--- 18,26 ----
  746. X  xchar tlx, tly;            /* set by pline; used by addtopl */
  747. X  #endif /* OVLB */
  748. X  
  749. X! STATIC_DCL void NDECL(redotoplin);
  750. X! STATIC_DCL void FDECL(xmore,(const char *));
  751. X! STATIC_VAR struct topl {
  752. X      struct topl *next_topl;
  753. X      char *topl_text;
  754. X  } *old_toplines, *last_redone_topl;
  755. X***************
  756. X*** 29,35 ****
  757. X  
  758. X  #ifdef OVL1
  759. X  
  760. X! XSTATIC void
  761. X  redotoplin() {
  762. X      home();
  763. X      if(index(toplines, '\n')) cl_end();
  764. X--- 29,35 ----
  765. X  
  766. X  #ifdef OVL1
  767. X  
  768. X! STATIC_OVL void
  769. X  redotoplin() {
  770. X      home();
  771. X      if(index(toplines, '\n')) cl_end();
  772. X***************
  773. X*** 78,84 ****
  774. X         !strcmp(toplines, old_toplines->topl_text)) return;
  775. X      last_redone_topl = 0;
  776. X      tl = (struct topl *)
  777. X!         alloc((unsigned)(strlen(toplines) + sizeof(struct topl) + 1));
  778. X      tl->next_topl = old_toplines;
  779. X      tl->topl_text = (char *)(tl + 1);
  780. X      Strcpy(tl->topl_text, toplines);
  781. X--- 78,84 ----
  782. X         !strcmp(toplines, old_toplines->topl_text)) return;
  783. X      last_redone_topl = 0;
  784. X      tl = (struct topl *)
  785. X!         alloc((unsigned)(strlen(toplines) + sizeof(struct topl) + 3));
  786. X      tl->next_topl = old_toplines;
  787. X      tl->topl_text = (char *)(tl + 1);
  788. X      Strcpy(tl->topl_text, toplines);
  789. X***************
  790. X*** 108,114 ****
  791. X  #endif /* OVL1 */
  792. X  #ifdef OVL2
  793. X  
  794. X! XSTATIC void
  795. X  xmore(s)
  796. X  const char *s;    /* allowed chars besides space/return */
  797. X  {
  798. X--- 108,114 ----
  799. X  #endif /* OVL1 */
  800. X  #ifdef OVL2
  801. X  
  802. X! STATIC_OVL void
  803. X  xmore(s)
  804. X  const char *s;    /* allowed chars besides space/return */
  805. X  {
  806. X*** src/Old/topten.c    Sun Jun  3 14:14:11 1990
  807. X--- src/topten.c    Sun May 27 20:50:35 1990
  808. X***************
  809. X*** 19,27 ****
  810. X  #endif
  811. X  #include <ctype.h>
  812. X  
  813. X! #ifdef LATTICE
  814. X! static void FDECL(lattice_mung_line,(char*));
  815. X! static void FDECL(lattice_unmung_line,(char*));
  816. X  #endif
  817. X  
  818. X  #define newttentry() (struct toptenentry *) alloc(sizeof(struct toptenentry))
  819. X--- 19,27 ----
  820. X  #endif
  821. X  #include <ctype.h>
  822. X  
  823. X! #ifdef NO_SCAN_BRACK
  824. X! static void FDECL(nsb_mung_line,(char*));
  825. X! static void FDECL(nsb_unmung_line,(char*));
  826. X  #endif
  827. X  
  828. X  #define newttentry() (struct toptenentry *) alloc(sizeof(struct toptenentry))
  829. X***************
  830. X*** 48,63 ****
  831. X  
  832. X  static char *FDECL(itoa, (int));
  833. X  static const char *FDECL(ordin, (int));
  834. X! static void outheader();
  835. X  static int FDECL(outentry, (int,struct toptenentry *,int));
  836. X  
  837. X  /* must fit with end.c */
  838. X! static const char *killed_by_prefix[] = {
  839. X      "killed by ", "choked on ", "poisoned by ", "", "drowned in ",
  840. X      "", "crushed to death by ", "petrified by ", "",
  841. X      "", "",
  842. X      "", "", "" };
  843. X  
  844. X  void
  845. X  topten(how)
  846. X  int how;
  847. X--- 48,131 ----
  848. X  
  849. X  static char *FDECL(itoa, (int));
  850. X  static const char *FDECL(ordin, (int));
  851. X! static void NDECL(outheader);
  852. X  static int FDECL(outentry, (int,struct toptenentry *,int));
  853. X+ static void FDECL(readentry, (FILE *,struct toptenentry *));
  854. X+ static void FDECL(writeentry, (FILE *,struct toptenentry *));
  855. X+ static int FDECL(classmon, (CHAR_P,BOOLEAN_P));
  856. X+ static boolean FDECL(onlyspace, (const char *));
  857. X  
  858. X  /* must fit with end.c */
  859. X! static const char NEARDATA *killed_by_prefix[] = {
  860. X      "killed by ", "choked on ", "poisoned by ", "", "drowned in ",
  861. X      "", "crushed to death by ", "petrified by ", "",
  862. X      "", "",
  863. X      "", "", "" };
  864. X  
  865. X+ static void
  866. X+ readentry(rfile,tt)
  867. X+ FILE *rfile;
  868. X+ struct toptenentry *tt;
  869. X+ {
  870. X+ # ifdef NO_SCAN_BRACK
  871. X+     if(fscanf(rfile,"%6s %d %d %d %d %d %ld%*c%c%c %s %s",
  872. X+ #  define TTFIELDS 12
  873. X+ # else
  874. X+     if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
  875. X+ #  define TTFIELDS 11
  876. X+ # endif
  877. X+         tt->date, &tt->uid,
  878. X+         &tt->level,
  879. X+         &tt->maxlvl, &tt->hp, &tt->maxhp, &tt->points,
  880. X+         &tt->plchar, &tt->sex,
  881. X+ #ifdef LATTICE    /* return value is broken also, sigh */
  882. X+         tt->name, tt->death) < 1)
  883. X+ #else
  884. X+         tt->name, tt->death) != TTFIELDS)
  885. X+ #endif
  886. X+ #undef TTFIELDS
  887. X+             tt->points = 0;
  888. X+ #ifdef NO_SCAN_BRACK
  889. X+     if(tt->points > 0) {
  890. X+         nsb_unmung_line(tt->name);
  891. X+         nsb_unmung_line(tt->death);
  892. X+     }
  893. X+ #endif
  894. X+ }
  895. X+ 
  896. X+ static void
  897. X+ writeentry(rfile,tt)
  898. X+ FILE *rfile;
  899. X+ struct toptenentry *tt;
  900. X+ {
  901. X+ #ifdef NO_SCAN_BRACK
  902. X+     nsb_mung_line(tt->name);
  903. X+     nsb_mung_line(tt->death);
  904. X+ #endif
  905. X+ # ifdef NO_SCAN_BRACK
  906. X+     (void) fprintf(rfile,"%6s %d %d %d %d %d %ld %c%c %s %s\n",
  907. X+ # else
  908. X+     (void) fprintf(rfile,"%6s %d %d %d %d %d %ld %c%c %s,%s\n",
  909. X+ # endif
  910. X+         tt->date, tt->uid,
  911. X+         tt->level,
  912. X+         tt->maxlvl, tt->hp, tt->maxhp, tt->points,
  913. X+         tt->plchar, tt->sex,
  914. X+         onlyspace(tt->name) ? "_" : tt->name, tt->death);
  915. X+ #ifdef NO_SCAN_BRACK
  916. X+     nsb_unmung_line(tt->name);
  917. X+     nsb_unmung_line(tt->death);
  918. X+ #endif
  919. X+ }
  920. X+ 
  921. X+ static boolean
  922. X+ onlyspace(s)
  923. X+ const char *s;
  924. X+ {
  925. X+     for (;*s;s++) if (!isspace(*s)) return(FALSE);
  926. X+     return(TRUE);
  927. X+ }
  928. X+ 
  929. X  void
  930. X  topten(how)
  931. X  int how;
  932. X***************
  933. X*** 65,71 ****
  934. X      int uid = getuid();
  935. X      int rank, rank0 = -1, rank1 = 0;
  936. X      int occ_cnt = PERSMAX;
  937. X!     register struct toptenentry *t0, *t1, *tprev;
  938. X  #ifdef UNIX
  939. X      char *reclock = "record_lock";
  940. X  # ifdef NO_FILE_LINKS
  941. X--- 133,140 ----
  942. X      int uid = getuid();
  943. X      int rank, rank0 = -1, rank1 = 0;
  944. X      int occ_cnt = PERSMAX;
  945. X!     register struct toptenentry *t0, *tprev;
  946. X!     register struct toptenentry *t1;
  947. X  #ifdef UNIX
  948. X      char *reclock = "record_lock";
  949. X  # ifdef NO_FILE_LINKS
  950. X***************
  951. X*** 170,180 ****
  952. X          HUP (void) puts("Cannot open log file!");
  953. X          goto lgend;
  954. X      }
  955. X!     (void) fprintf(lfile,"%6s %d %d %d %d %d %ld %c%c %s,%s\n",
  956. X!         t0->date, t0->uid,
  957. X!         t0->level, t0->maxlvl,
  958. X!         t0->hp, t0->maxhp, t0->points,
  959. X!         t0->plchar, t0->sex, t0->name, t0->death);
  960. X      (void) fclose(lfile);
  961. X  # if defined(UNIX) || defined(VMS)
  962. X      (void) unlink(loglock);
  963. X--- 239,245 ----
  964. X          HUP (void) puts("Cannot open log file!");
  965. X          goto lgend;
  966. X      }
  967. X!     writeentry(lfile, t0);
  968. X      (void) fclose(lfile);
  969. X  # if defined(UNIX) || defined(VMS)
  970. X      (void) unlink(loglock);
  971. X***************
  972. X*** 228,240 ****
  973. X              short    i;
  974. X      
  975. X              rfile = openFile(recfile,"r");
  976. X-             
  977. X-             for (i = 0;i < t->maxRow; i++) {
  978. X-                 MoveTo(Screen_Border,
  979. X-                 t->ascent + (i * t->height) + Screen_Border);
  980. X-                 DrawText(&t->screen[i][0], 0, t->maxCol);
  981. X-             }
  982. X-             ValidRect(&(**(*HackWindow).visRgn).rgnBBox);
  983. X          }
  984. X      }
  985. X  
  986. X--- 293,298 ----
  987. X***************
  988. X*** 257,280 ****
  989. X      tprev = 0;
  990. X      /* rank0: -1 undefined, 0 not_on_list, n n_th on list */
  991. X      for(rank = 1; ; ) {
  992. X! #ifdef LATTICE
  993. X!         if(fscanf(rfile,"%6s %d %d %d %d %d %ld%*c%c%c %s %s",
  994. X! #else
  995. X!         if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
  996. X! #endif /* LATTICE */
  997. X!         t1->date, &t1->uid,
  998. X!         &t1->level, &t1->maxlvl,
  999. X!         &t1->hp, &t1->maxhp, &t1->points,
  1000. X!         &t1->plchar, &t1->sex,
  1001. X! #ifdef LATTICE    /* return value is broken also, sigh */
  1002. X!         t1->name, t1->death) <1    || t1->points < POINTSMIN)
  1003. X! #else
  1004. X!         t1->name, t1->death) != 11 || t1->points < POINTSMIN)
  1005. X! #endif
  1006. X!             t1->points = 0;
  1007. X! #ifdef LATTICE
  1008. X!         lattice_unmung_line(t1->death);
  1009. X! #endif
  1010. X          if(rank0 < 0 && t1->points < t0->points) {
  1011. X          rank0 = rank++;
  1012. X          if(tprev == 0)
  1013. X--- 315,322 ----
  1014. X      tprev = 0;
  1015. X      /* rank0: -1 undefined, 0 not_on_list, n n_th on list */
  1016. X      for(rank = 1; ; ) {
  1017. X!         readentry(rfile, t1);
  1018. X!         if (t1->points < POINTSMIN) t1->points = 0;
  1019. X          if(rank0 < 0 && t1->points < t0->points) {
  1020. X          rank0 = rank++;
  1021. X          if(tprev == 0)
  1022. X***************
  1023. X*** 342,364 ****
  1024. X      if(!done_stopprint) outheader();
  1025. X      t1 = tt_head;
  1026. X      for(rank = 1; t1->points != 0; rank++, t1 = t1->tt_next) {
  1027. X! #ifdef LATTICE
  1028. X!       lattice_mung_line(t1->death);
  1029. X!       if(flg) (void) fprintf(rfile,"%6s %d %d %d %d %d %ld %c%c %s %s\n",
  1030. X! #else
  1031. X!       if(flg) (void) fprintf(rfile,"%6s %d %d %d %d %d %ld %c%c %s,%s\n",
  1032. X! #endif
  1033. X!         t1->date, t1->uid,
  1034. X!         t1->level, t1->maxlvl,
  1035. X!         t1->hp, t1->maxhp, t1->points,
  1036. X!         t1->plchar, t1->sex, t1->name, t1->death);
  1037. X! #ifdef LATTICE
  1038. X!       lattice_unmung_line(t1->death);
  1039. X! #endif
  1040. X!       if(done_stopprint) continue;
  1041. X!       if(rank > flags.end_top &&
  1042. X!         (rank < rank0-flags.end_around || rank > rank0+flags.end_around)
  1043. X!         && (!flags.end_own ||
  1044. X  #ifdef PERS_IS_UID
  1045. X                    t1->uid != t0->uid
  1046. X  #else
  1047. X--- 384,394 ----
  1048. X      if(!done_stopprint) outheader();
  1049. X      t1 = tt_head;
  1050. X      for(rank = 1; t1->points != 0; rank++, t1 = t1->tt_next) {
  1051. X!         if(flg) writeentry(rfile, t1);
  1052. X!         if(done_stopprint) continue;
  1053. X!         if(rank > flags.end_top &&
  1054. X!           (rank < rank0-flags.end_around || rank > rank0+flags.end_around)
  1055. X!           && (!flags.end_own ||
  1056. X  #ifdef PERS_IS_UID
  1057. X                    t1->uid != t0->uid
  1058. X  #else
  1059. X***************
  1060. X*** 365,388 ****
  1061. X                    strncmp(t1->name, t0->name, NAMSZ)
  1062. X  #endif
  1063. X          )) continue;
  1064. X!       if(rank == rank0-flags.end_around &&
  1065. X!          rank0 > flags.end_top+flags.end_around+1 &&
  1066. X!          !flags.end_own)
  1067. X          (void) putchar('\n');
  1068. X!       if(rank != rank0)
  1069. X          (void) outentry(rank, t1, 0);
  1070. X!       else if(!rank1)
  1071. X          (void) outentry(rank, t1, 1);
  1072. X!       else {
  1073. X          int t0lth = outentry(0, t0, -1);
  1074. X          int t1lth = outentry(rank, t1, t0lth);
  1075. X          if(t1lth > t0lth) t0lth = t1lth;
  1076. X          (void) outentry(0, t0, t0lth);
  1077. X!       }
  1078. X      }
  1079. X      if(rank0 >= rank) if(!done_stopprint)
  1080. X          (void) outentry(0, t0, 1);
  1081. X      (void) fclose(rfile);
  1082. X  #ifdef VMS
  1083. X      if (flg) {
  1084. X          delete(RECORD);
  1085. X--- 395,437 ----
  1086. X                    strncmp(t1->name, t0->name, NAMSZ)
  1087. X  #endif
  1088. X          )) continue;
  1089. X!         if(rank == rank0-flags.end_around &&
  1090. X!            rank0 > flags.end_top+flags.end_around+1 &&
  1091. X!            !flags.end_own)
  1092. X          (void) putchar('\n');
  1093. X!         if(rank != rank0)
  1094. X          (void) outentry(rank, t1, 0);
  1095. X!         else if(!rank1)
  1096. X          (void) outentry(rank, t1, 1);
  1097. X!         else {
  1098. X          int t0lth = outentry(0, t0, -1);
  1099. X          int t1lth = outentry(rank, t1, t0lth);
  1100. X          if(t1lth > t0lth) t0lth = t1lth;
  1101. X          (void) outentry(0, t0, t0lth);
  1102. X!         }
  1103. X      }
  1104. X      if(rank0 >= rank) if(!done_stopprint)
  1105. X          (void) outentry(0, t0, 1);
  1106. X      (void) fclose(rfile);
  1107. X+ #ifdef MACOS
  1108. X+     {
  1109. X+         Str255    name;
  1110. X+         FInfo    fndrInfo;
  1111. X+         term_info    *t;
  1112. X+         short    oldVol, error;
  1113. X+         
  1114. X+         t = (term_info *)GetWRefCon(HackWindow);
  1115. X+         GetVol(name, &oldVol);
  1116. X+         SetVol(0L, t->recordVRefNum);
  1117. X+         Strcpy((char *)name,recfile);
  1118. X+         CtoPstr((char *)name);
  1119. X+         error = GetFInfo(name, (short)0, &fndrInfo);
  1120. X+         fndrInfo.fdCreator = CREATOR;
  1121. X+         if (error == noErr)
  1122. X+             SetFInfo(name, (short)0, &fndrInfo);
  1123. X+         SetVol(0L, oldVol);
  1124. X+     }
  1125. X+ #endif
  1126. X  #ifdef VMS
  1127. X      if (flg) {
  1128. X          delete(RECORD);
  1129. X***************
  1130. X*** 469,475 ****
  1131. X          Sprintf(eos(linebuf), " on dungeon level %d", t1->level);
  1132. X        if(t1->maxlvl != t1->level)
  1133. X          Sprintf(eos(linebuf), " [max %d]", t1->maxlvl);
  1134. X!     /* kuldge for "quit while already on Charon's boat" */
  1135. X        if(!strncmp(t1->death, "quit ", 5))
  1136. X          Strcat(linebuf, t1->death + 4);
  1137. X      }
  1138. X--- 518,524 ----
  1139. X          Sprintf(eos(linebuf), " on dungeon level %d", t1->level);
  1140. X        if(t1->maxlvl != t1->level)
  1141. X          Sprintf(eos(linebuf), " [max %d]", t1->maxlvl);
  1142. X!     /* kludge for "quit while already on Charon's boat" */
  1143. X        if(!strncmp(t1->death, "quit ", 5))
  1144. X          Strcat(linebuf, t1->death + 4);
  1145. X      }
  1146. X***************
  1147. X*** 504,510 ****
  1148. X      /* Quit, starved, ascended, and escaped contain no second line */
  1149. X      if (second_line) {
  1150. X          Strcpy(linebuf2, t1->death);
  1151. X!         *linebuf2 = toupper(*linebuf2);
  1152. X          Strcat(linebuf2, ".");
  1153. X      }
  1154. X  
  1155. X--- 553,559 ----
  1156. X      /* Quit, starved, ascended, and escaped contain no second line */
  1157. X      if (second_line) {
  1158. X          Strcpy(linebuf2, t1->death);
  1159. X!         if (islower(*linebuf2)) *linebuf2 = toupper(*linebuf2);
  1160. X          Strcat(linebuf2, ".");
  1161. X      }
  1162. X  
  1163. X***************
  1164. X*** 619,649 ****
  1165. X  
  1166. X      t1 = tt_head = newttentry();
  1167. X      for(rank = 1; ; rank++) {
  1168. X! #ifdef LATTICE
  1169. X!       if(fscanf(rfile, "%6s %d %d %d %d %d %ld%*c%c%c %s %s",
  1170. X! #else
  1171. X!       if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
  1172. X! #endif /* LATTICE */
  1173. X!         t1->date, &t1->uid,
  1174. X!         &t1->level, &t1->maxlvl,
  1175. X!         &t1->hp, &t1->maxhp, &t1->points,
  1176. X!         &t1->plchar, &t1->sex,
  1177. X! #ifdef LATTICE
  1178. X!         t1->name, t1->death)<1)
  1179. X! #else
  1180. X!         t1->name, t1->death) != 11)
  1181. X! #endif
  1182. X!             t1->points = 0;
  1183. X!       if(t1->points == 0) break;
  1184. X! #ifdef LATTICE
  1185. X!        lattice_unmung_line(t1->death);
  1186. X! #endif
  1187. X  #ifdef PERS_IS_UID
  1188. X!       if(!playerct && t1->uid == uid)
  1189. X          flg++;
  1190. X!       else
  1191. X  #endif
  1192. X!       for(i = 0; i < playerct; i++){
  1193. X          if(strcmp(players[i], "all") == 0 ||
  1194. X             strncmp(t1->name, players[i], NAMSZ) == 0 ||
  1195. X            (players[i][0] == '-' &&
  1196. X--- 668,681 ----
  1197. X  
  1198. X      t1 = tt_head = newttentry();
  1199. X      for(rank = 1; ; rank++) {
  1200. X!         readentry(rfile, t1);
  1201. X!         if(t1->points == 0) break;
  1202. X  #ifdef PERS_IS_UID
  1203. X!         if(!playerct && t1->uid == uid)
  1204. X          flg++;
  1205. X!         else
  1206. X  #endif
  1207. X!         for(i = 0; i < playerct; i++){
  1208. X          if(strcmp(players[i], "all") == 0 ||
  1209. X             strncmp(t1->name, players[i], NAMSZ) == 0 ||
  1210. X            (players[i][0] == '-' &&
  1211. X***************
  1212. X*** 651,658 ****
  1213. X             players[i][2] == 0) ||
  1214. X            (digit(players[i][0]) && rank <= atoi(players[i])))
  1215. X              flg++;
  1216. X!       }
  1217. X!       t1 = t1->tt_next = newttentry();
  1218. X      }
  1219. X      (void) fclose(rfile);
  1220. X      if(!flg) {
  1221. X--- 683,690 ----
  1222. X             players[i][2] == 0) ||
  1223. X            (digit(players[i][0]) && rank <= atoi(players[i])))
  1224. X              flg++;
  1225. X!         }
  1226. X!         t1 = t1->tt_next = newttentry();
  1227. X      }
  1228. X      (void) fclose(rfile);
  1229. X      if(!flg) {
  1230. X***************
  1231. X*** 715,720 ****
  1232. X--- 747,755 ----
  1233. X          break;
  1234. X      }
  1235. X  #endif /* nonsense /**/
  1236. X+ #ifdef MACOS
  1237. X+     more();
  1238. X+ #endif
  1239. X  }
  1240. X  
  1241. X  static int
  1242. X***************
  1243. X*** 772,796 ****
  1244. X      rank = rnd(10);
  1245. X  pickentry:
  1246. X      for(i = rank; i; i--) {
  1247. X! #ifdef LATTICE
  1248. X!       if(fscanf(rfile, "%6s %d %d %d %d %d %ld%*c%c%c %s %s",
  1249. X! #else
  1250. X!       if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
  1251. X! #endif
  1252. X!         tt->date, &tt->uid,
  1253. X!         &tt->level, &tt->maxlvl,
  1254. X!         &tt->hp, &tt->maxhp, &tt->points,
  1255. X!         &tt->plchar, &tt->sex,
  1256. X! #ifdef LATTICE
  1257. X!         tt->name, tt->death) <1)
  1258. X! #else
  1259. X!         tt->name, tt->death) != 11)
  1260. X! #endif
  1261. X!             tt->points = 0;
  1262. X!       if(tt->points == 0) break;
  1263. X! #ifdef LATTICE
  1264. X!       lattice_unmung_line(tt->death);
  1265. X! #endif
  1266. X      }
  1267. X  
  1268. X      if(tt->points == 0) {
  1269. X--- 807,814 ----
  1270. X      rank = rnd(10);
  1271. X  pickentry:
  1272. X      for(i = rank; i; i--) {
  1273. X!         readentry(rfile, tt);
  1274. X!         if(tt->points == 0) break;
  1275. X      }
  1276. X  
  1277. X      if(tt->points == 0) {
  1278. X***************
  1279. X*** 814,828 ****
  1280. X      return otmp;
  1281. X  }
  1282. X  
  1283. X! #ifdef LATTICE
  1284. X  /* Lattice scanf isn't up to reading the scorefile.  What */
  1285. X  /* follows deals with that; I admit it's ugly. (KL) */
  1286. X! static void lattice_mung_line(p)
  1287. X      char *p;
  1288. X      {
  1289. X      while(p=strchr(p,' '))*p='|';
  1290. X  }
  1291. X! static void lattice_unmung_line(p)
  1292. X      char *p;
  1293. X      {
  1294. X      while(p=strchr(p,'|'))*p=' ';
  1295. X--- 832,847 ----
  1296. X      return otmp;
  1297. X  }
  1298. X  
  1299. X! #ifdef NO_SCAN_BRACK
  1300. X  /* Lattice scanf isn't up to reading the scorefile.  What */
  1301. X  /* follows deals with that; I admit it's ugly. (KL) */
  1302. X! /* Now generally available (KL) */
  1303. X! static void nsb_mung_line(p)
  1304. X      char *p;
  1305. X      {
  1306. X      while(p=strchr(p,' '))*p='|';
  1307. X  }
  1308. X! static void nsb_unmung_line(p)
  1309. X      char *p;
  1310. X      {
  1311. X      while(p=strchr(p,'|'))*p=' ';
  1312. X*** src/Old/track.c    Sun Jun  3 14:14:46 1990
  1313. X--- src/track.c    Sat May 26 22:43:19 1990
  1314. X***************
  1315. X*** 1,4 ****
  1316. X! /*    SCCS Id: @(#)track.c    1.4    87/08/08
  1317. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1318. X  /* NetHack may be freely redistributed.  See license for details. */
  1319. X  /* track.c - version 1.0.2 */
  1320. X--- 1,4 ----
  1321. X! /*    SCCS Id: @(#)track.c    3.0    87/08/08
  1322. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1323. X  /* NetHack may be freely redistributed.  See license for details. */
  1324. X  /* track.c - version 1.0.2 */
  1325. X***************
  1326. X*** 7,14 ****
  1327. X  
  1328. X  #define    UTSZ    50
  1329. X  
  1330. X! VSTATIC int utcnt, utpnt;
  1331. X! VSTATIC coord utrack[UTSZ];
  1332. X  
  1333. X  #ifdef OVLB
  1334. X  void
  1335. X--- 7,14 ----
  1336. X  
  1337. X  #define    UTSZ    50
  1338. X  
  1339. X! STATIC_VAR int NEARDATA utcnt, NEARDATA utpnt;
  1340. X! STATIC_VAR coord NEARDATA utrack[UTSZ];
  1341. X  
  1342. X  #ifdef OVLB
  1343. X  void
  1344. X*** src/Old/trap.c    Sun Jun  3 14:15:03 1990
  1345. X--- src/trap.c    Thu May 31 22:13:54 1990
  1346. X***************
  1347. X*** 36,45 ****
  1348. X  #endif /* OVLB */
  1349. X  
  1350. X  void NDECL(domagictrap);
  1351. X! OSTATIC boolean FDECL(thitm, (int, struct monst *, struct obj *, int));
  1352. X  
  1353. X  #ifdef OVLB
  1354. X  
  1355. X  /* Generic rust-armor function.  Returns TRUE if a message was printed;
  1356. X   * "print", if set, means to print a message (and thus to return TRUE) even
  1357. X   * if the item could not be rusted; otherwise a message is printed and TRUE is
  1358. X--- 36,47 ----
  1359. X  #endif /* OVLB */
  1360. X  
  1361. X  void NDECL(domagictrap);
  1362. X! STATIC_DCL boolean FDECL(thitm, (int, struct monst *, struct obj *, int));
  1363. X  
  1364. X  #ifdef OVLB
  1365. X  
  1366. X+ static void NDECL(vtele);
  1367. X+ 
  1368. X  /* Generic rust-armor function.  Returns TRUE if a message was printed;
  1369. X   * "print", if set, means to print a message (and thus to return TRUE) even
  1370. X   * if the item could not be rusted; otherwise a message is printed and TRUE is
  1371. X***************
  1372. X*** 52,60 ****
  1373. X  int type;
  1374. X  boolean print;
  1375. X  {
  1376. X!     static const char *gook[] = { "slag", "rust", "rot", "corrosion" };
  1377. X!     static const char *action[] = { "smolder", "rust", "rot", "corrode" };
  1378. X!     static const char *msg[] =  { "burnt", "rusted", "rotten", "corroded" };
  1379. X      boolean vulnerable = FALSE;
  1380. X      boolean plural;
  1381. X  
  1382. X--- 54,62 ----
  1383. X  int type;
  1384. X  boolean print;
  1385. X  {
  1386. X!     static const char NEARDATA *gook[] = { "slag", "rust", "rot", "corrosion" };
  1387. X!     static const char NEARDATA *action[] = { "smolder", "rust", "rot", "corrode" };
  1388. X!     static const char NEARDATA *msg[] =  { "burnt", "rusted", "rotten", "corroded" };
  1389. X      boolean vulnerable = FALSE;
  1390. X      boolean plural;
  1391. X  
  1392. X***************
  1393. X*** 201,206 ****
  1394. X--- 203,251 ----
  1395. X  }
  1396. X  
  1397. X  void
  1398. X+ fall_through(td)
  1399. X+ boolean td;    /* td == TRUE : trapdoor */
  1400. X+ {
  1401. X+     register int newlevel = dlevel + 1;
  1402. X+ 
  1403. X+     while(!rn2(4) && newlevel < 29) newlevel++;
  1404. X+     if(td) pline("A trap door opens up under you!");
  1405. X+     else pline("The floor opens up under you!");
  1406. X+     if(Levitation || u.ustuck || dlevel == MAXLEVEL
  1407. X+ #ifdef POLYSELF
  1408. X+         || is_flyer(uasmon) || u.umonnum == PM_WUMPUS
  1409. X+ #endif
  1410. X+ #ifdef ENDGAME
  1411. X+         || dlevel == ENDLEVEL
  1412. X+ #endif
  1413. X+     ) {
  1414. X+         You("don't fall in.");
  1415. X+         if(!td) {
  1416. X+         more();
  1417. X+         pline("The opening under you closes up.");
  1418. X+         }
  1419. X+         return;
  1420. X+     }
  1421. X+ #ifdef WALKIES
  1422. X+     if(!next_to_u()) {
  1423. X+         You("are jerked back by your pet!");
  1424. X+         if(!td) {
  1425. X+         more();
  1426. X+         pline("The opening in the floor closes up.");
  1427. X+         }
  1428. X+     } else {
  1429. X+ #endif
  1430. X+         if(in_shop(u.ux, u.uy)) shopdig(1);
  1431. X+         unsee();
  1432. X+         (void) fflush(stdout);
  1433. X+         goto_level(newlevel, FALSE, TRUE);
  1434. X+         if(!td) pline("The hole in the ceiling above you closes up.");
  1435. X+ #ifdef WALKIES
  1436. X+     }
  1437. X+ #endif
  1438. X+ }
  1439. X+ 
  1440. X+ void
  1441. X  dotrap(trap)
  1442. X  register struct trap *trap;
  1443. X  {
  1444. X***************
  1445. X*** 271,276 ****
  1446. X--- 316,322 ----
  1447. X              break;
  1448. X          case MONST_TRAP:
  1449. X              if(mtmp=makemon(&mons[trap->pm],u.ux,u.uy)) {
  1450. X+               mtmp->mpeaceful = FALSE;
  1451. X                switch(mtmp->data->mlet) {
  1452. X              case S_PIERCER:
  1453. X                  pline("%s suddenly drops from the ceiling!",
  1454. X***************
  1455. X*** 317,350 ****
  1456. X                  || u.uundetected
  1457. X  #endif
  1458. X                          ) newsym(u.ux, u.uy);
  1459. X!             } else {
  1460. X!             register int newlevel = dlevel + 1;
  1461. X!             while(!rn2(4) && newlevel < 29) newlevel++;
  1462. X!             pline("A trap door opens up under you!");
  1463. X!             if(Levitation || u.ustuck || dlevel == MAXLEVEL
  1464. X! #ifdef POLYSELF
  1465. X!                 || is_flyer(uasmon) || u.umonnum == PM_WUMPUS
  1466. X! #endif
  1467. X! #ifdef ENDGAME
  1468. X!                 || dlevel == ENDLEVEL
  1469. X! #endif
  1470. X!                             ) {
  1471. X!                 You("don't fall in.");
  1472. X!                 break;
  1473. X!             }
  1474. X! #ifdef WALKIES
  1475. X!             if(!next_to_u())
  1476. X!                 You("are jerked back by your pet!");
  1477. X!             else {
  1478. X! #endif
  1479. X!                 if(in_shop(u.ux, u.uy)) shopdig(1);
  1480. X!                 unsee();
  1481. X!                 (void) fflush(stdout);
  1482. X!                 goto_level(newlevel, FALSE, TRUE);
  1483. X! #ifdef WALKIES
  1484. X!             }
  1485. X! #endif
  1486. X!             }
  1487. X              break;
  1488. X          case DART_TRAP:
  1489. X              pline("A little dart shoots out at you!");
  1490. X--- 363,369 ----
  1491. X                  || u.uundetected
  1492. X  #endif
  1493. X                          ) newsym(u.ux, u.uy);
  1494. X!             } else fall_through(TRUE);
  1495. X              break;
  1496. X          case DART_TRAP:
  1497. X              pline("A little dart shoots out at you!");
  1498. X***************
  1499. X*** 644,654 ****
  1500. X  
  1501. X  #ifdef WALKIES
  1502. X  
  1503. X! OSTATIC boolean FDECL(teleport_pet, (struct monst *));
  1504. X  
  1505. X  #ifdef OVLB
  1506. X  
  1507. X! XSTATIC boolean
  1508. X  teleport_pet(mtmp)
  1509. X  register struct monst *mtmp;
  1510. X  {
  1511. X--- 663,673 ----
  1512. X  
  1513. X  #ifdef WALKIES
  1514. X  
  1515. X! STATIC_DCL boolean FDECL(teleport_pet, (struct monst *));
  1516. X  
  1517. X  #ifdef OVLB
  1518. X  
  1519. X! STATIC_OVL boolean
  1520. X  teleport_pet(mtmp)
  1521. X  register struct monst *mtmp;
  1522. X  {
  1523. X***************
  1524. X*** 674,684 ****
  1525. X  
  1526. X  #endif /* OVLB */
  1527. X  
  1528. X! #endif
  1529. X  
  1530. X  #ifdef OVLB
  1531. X  
  1532. X! XSTATIC void
  1533. X  seetrap(trap)
  1534. X  
  1535. X      register struct trap *trap;
  1536. X--- 693,705 ----
  1537. X  
  1538. X  #endif /* OVLB */
  1539. X  
  1540. X! #endif /* WALKIES */
  1541. X! 
  1542. X! STATIC_DCL void FDECL(seetrap, (struct trap *));
  1543. X  
  1544. X  #ifdef OVLB
  1545. X  
  1546. X! STATIC_OVL void
  1547. X  seetrap(trap)
  1548. X  
  1549. X      register struct trap *trap;
  1550. X***************
  1551. X*** 929,938 ****
  1552. X  
  1553. X              if(rn2(3))
  1554. X                  break; /* monsters usually don't set it off */
  1555. X!             if(in_sight)
  1556. X                  pline("KAABLAMM!!!  %s triggers a land mine!",
  1557. X                    Monnam(mtmp));
  1558. X!             else if (flags.soundok)
  1559. X                  pline("Kaablamm!  You hear an explosion in the distance!");
  1560. X              deltrap(t_at(mtmp->mx, mtmp->my));
  1561. X              if(thitm(0, mtmp, (struct obj *)0, rnd(16)))
  1562. X--- 950,967 ----
  1563. X  
  1564. X              if(rn2(3))
  1565. X                  break; /* monsters usually don't set it off */
  1566. X!             if(is_flyer(mtmp->data)) {
  1567. X!                 if (in_sight) {
  1568. X!     pline("A trigger appears in a pile of soil below %s.", Monnam(mtmp));
  1569. X!                     seetrap(trap);
  1570. X!                 }
  1571. X!                 if (rn2(3)) break;
  1572. X!                 if (in_sight)
  1573. X!                     pline("The air currents set it off!");
  1574. X!             } else if(in_sight)
  1575. X                  pline("KAABLAMM!!!  %s triggers a land mine!",
  1576. X                    Monnam(mtmp));
  1577. X!             if (!in_sight && flags.soundok)
  1578. X                  pline("Kaablamm!  You hear an explosion in the distance!");
  1579. X              deltrap(t_at(mtmp->mx, mtmp->my));
  1580. X              if(thitm(0, mtmp, (struct obj *)0, rnd(16)))
  1581. X***************
  1582. X*** 1246,1255 ****
  1583. X  
  1584. X  void
  1585. X  level_tele() {
  1586. X! register int newlevel;
  1587. X! #ifdef WALKIES
  1588. X! register boolean pet_by_u = next_to_u();
  1589. X! #endif
  1590. X  
  1591. X      if(u.uhave_amulet
  1592. X  #ifdef ENDGAME
  1593. X--- 1275,1281 ----
  1594. X  
  1595. X  void
  1596. X  level_tele() {
  1597. X!     register int newlevel;
  1598. X  
  1599. X      if(u.uhave_amulet
  1600. X  #ifdef ENDGAME
  1601. X***************
  1602. X*** 1284,1293 ****
  1603. X          if(dlevel == newlevel)
  1604. X          if(is_maze_lev) newlevel--; else newlevel++;
  1605. X      }
  1606. X!     if(newlevel < 0) {
  1607. X  #ifdef WALKIES
  1608. X!         if(pet_by_u) {
  1609. X  #endif
  1610. X          if(newlevel <= -10) {
  1611. X              You("arrive in heaven.");
  1612. X              verbalize("Thou art early, but we'll admit thee.");
  1613. X--- 1310,1324 ----
  1614. X          if(dlevel == newlevel)
  1615. X          if(is_maze_lev) newlevel--; else newlevel++;
  1616. X      }
  1617. X! 
  1618. X  #ifdef WALKIES
  1619. X!     if(!next_to_u()) {
  1620. X!         You("shudder for a moment...");
  1621. X!         return;
  1622. X!     }
  1623. X  #endif
  1624. X+ 
  1625. X+     if(newlevel < 0) {
  1626. X          if(newlevel <= -10) {
  1627. X              You("arrive in heaven.");
  1628. X              verbalize("Thou art early, but we'll admit thee.");
  1629. X***************
  1630. X*** 1294,1348 ****
  1631. X              killer_format = NO_KILLER_PREFIX;
  1632. X              killer = "went to heaven prematurely";
  1633. X              done(DIED);
  1634. X          } else    if (newlevel == -9) {
  1635. X              You("feel deliriously happy. ");
  1636. X              pline("(In fact, you're on Cloud 9!) ");
  1637. X              more();
  1638. X          } else
  1639. X! #ifndef STRONGHOLD
  1640. X!             newlevel = 0;
  1641. X! #else
  1642. X!             newlevel = 1;
  1643. X! #endif
  1644. X!         You("are now high above the clouds...");
  1645. X          if(Levitation) {
  1646. X              You("float gently down to earth.");
  1647. X! #ifndef STRONGHOLD
  1648. X              done(ESCAPED);
  1649. X  #endif
  1650. X          }
  1651. X  #ifdef POLYSELF
  1652. X!         if(is_flyer(uasmon)) {
  1653. X              You("fly down to earth.");
  1654. X! # ifndef STRONGHOLD
  1655. X              done(ESCAPED);
  1656. X  # endif
  1657. X          }
  1658. X  #endif
  1659. X!         pline("Unfortunately, you don't know how to fly.");
  1660. X!         You("plummet a few thousand feet to your death.");
  1661. X!         dlevel = 0;
  1662. X!         killer_format = NO_KILLER_PREFIX;
  1663. X!         killer =
  1664. X      self_pronoun("teleported out of the dungeon and fell to %s death","his");
  1665. X!         done(DIED);
  1666. X! #ifdef WIZARD
  1667. X!         return;  
  1668. X! #endif
  1669. X! #ifdef WALKIES
  1670. X!         } else {
  1671. X!         You("shudder for a moment...");
  1672. X!         return;
  1673. X!         }
  1674. X! #endif
  1675. X      }
  1676. X      /* calls done(ESCAPED) if newlevel==0 */
  1677. X! #ifdef WALKIES
  1678. X!     if(!pet_by_u)
  1679. X!         You("shudder for a moment...");
  1680. X!     else
  1681. X! #endif
  1682. X!         goto_level(newlevel, FALSE, FALSE);
  1683. X  }
  1684. X  
  1685. X  void
  1686. X--- 1325,1374 ----
  1687. X              killer_format = NO_KILLER_PREFIX;
  1688. X              killer = "went to heaven prematurely";
  1689. X              done(DIED);
  1690. X+             return;
  1691. X          } else    if (newlevel == -9) {
  1692. X              You("feel deliriously happy. ");
  1693. X              pline("(In fact, you're on Cloud 9!) ");
  1694. X              more();
  1695. X          } else
  1696. X!             You("are now high above the clouds...");
  1697. X! 
  1698. X          if(Levitation) {
  1699. X              You("float gently down to earth.");
  1700. X! #ifdef STRONGHOLD
  1701. X!             newlevel = 1;
  1702. X! #else
  1703. X              done(ESCAPED);
  1704. X  #endif
  1705. X          }
  1706. X  #ifdef POLYSELF
  1707. X!         else if(is_flyer(uasmon)) {
  1708. X              You("fly down to earth.");
  1709. X! # ifdef STRONGHOLD
  1710. X!             newlevel = 1;
  1711. X! # else
  1712. X              done(ESCAPED);
  1713. X  # endif
  1714. X          }
  1715. X  #endif
  1716. X!         else {
  1717. X!             int save_dlevel;
  1718. X! 
  1719. X!             save_dlevel = dlevel;
  1720. X!             pline("Unfortunately, you don't know how to fly.");
  1721. X!             You("plummet a few thousand feet to your death.");
  1722. X!             dlevel = 0;
  1723. X!             killer_format = NO_KILLER_PREFIX;
  1724. X!             killer =
  1725. X      self_pronoun("teleported out of the dungeon and fell to %s death","his");
  1726. X!             done(DIED);
  1727. X!             dlevel = save_dlevel;
  1728. X!             return;  
  1729. X!         }
  1730. X      }
  1731. X+ 
  1732. X      /* calls done(ESCAPED) if newlevel==0 */
  1733. X!     goto_level(newlevel, FALSE, FALSE);
  1734. X  }
  1735. X  
  1736. X  void
  1737. X***************
  1738. X*** 1418,1429 ****
  1739. X           case 19:
  1740. X              /* tame nearby monsters */
  1741. X             {   register int i,j;
  1742. X  
  1743. X                 /* below pline added by GAN 10/30/86 */
  1744. X                 adjattrib(A_CHA,1,FALSE);
  1745. X!                for(i = -1; i <= 1; i++) for(j = -1; j <= 1; j++)
  1746. X!                if(MON_AT(u.ux+i, u.uy+j))
  1747. X!                (void) tamedog(m_at(u.ux+i, u.uy+j), (struct obj *)0);
  1748. X                 break;
  1749. X             }
  1750. X  
  1751. X--- 1444,1459 ----
  1752. X           case 19:
  1753. X              /* tame nearby monsters */
  1754. X             {   register int i,j;
  1755. X+                register struct monst *mtmp;
  1756. X  
  1757. X                 /* below pline added by GAN 10/30/86 */
  1758. X                 adjattrib(A_CHA,1,FALSE);
  1759. X!                for(i = -1; i <= 1; i++) for(j = -1; j <= 1; j++) {
  1760. X!                if(!isok(u.ux+i, u.uy+j)) continue;
  1761. X!                mtmp = m_at(u.ux+i, u.uy+j);
  1762. X!                if(mtmp)
  1763. X!                    (void) tamedog(mtmp, (struct obj *)0);
  1764. X!                }
  1765. X                 break;
  1766. X             }
  1767. X  
  1768. X***************
  1769. X*** 1695,1702 ****
  1770. X          case 4:
  1771. X          case 3:
  1772. X              pline("Suddenly you are frozen in place!");
  1773. X              nomovemsg = "You can move again.";
  1774. X-             multi = -d(5, 6);
  1775. X              break;
  1776. X          case 2:
  1777. X          case 1:
  1778. X--- 1725,1732 ----
  1779. X          case 4:
  1780. X          case 3:
  1781. X              pline("Suddenly you are frozen in place!");
  1782. X+             nomul(-d(5, 6));
  1783. X              nomovemsg = "You can move again.";
  1784. X              break;
  1785. X          case 2:
  1786. X          case 1:
  1787. X***************
  1788. X*** 1781,1787 ****
  1789. X  
  1790. X  /* Monster is hit by trap. */
  1791. X  /* Note: doesn't work if both obj and d_override are null */
  1792. X! XSTATIC boolean
  1793. X  thitm(tlev, mon, obj, d_override)
  1794. X  register int tlev;
  1795. X  register struct monst *mon;
  1796. X--- 1811,1817 ----
  1797. X  
  1798. X  /* Monster is hit by trap. */
  1799. X  /* Note: doesn't work if both obj and d_override are null */
  1800. X! STATIC_OVL boolean
  1801. X  thitm(tlev, mon, obj, d_override)
  1802. X  register int tlev;
  1803. X  register struct monst *mon;
  1804. X*** src/Old/u_init.c    Sun Jun  3 14:16:06 1990
  1805. X--- src/u_init.c    Sun Feb 25 14:49:27 1990
  1806. X***************
  1807. X*** 545,556 ****
  1808. X           */
  1809. X          if (undefined) {
  1810. X  #ifdef POLYSELF
  1811. X!             static unsigned nocreate = STRANGE_OBJECT;
  1812. X  #  ifdef SPELLS
  1813. X!             static unsigned nocreate2 = STRANGE_OBJECT;
  1814. X  #  endif
  1815. X  #endif
  1816. X!             static unsigned nocreate3 = STRANGE_OBJECT;
  1817. X  
  1818. X              while(obj->otyp == WAN_WISHING
  1819. X  #ifdef POLYSELF
  1820. X--- 545,556 ----
  1821. X           */
  1822. X          if (undefined) {
  1823. X  #ifdef POLYSELF
  1824. X!             static unsigned NEARDATA nocreate = STRANGE_OBJECT;
  1825. X  #  ifdef SPELLS
  1826. X!             static unsigned NEARDATA nocreate2 = STRANGE_OBJECT;
  1827. X  #  endif
  1828. X  #endif
  1829. X!             static unsigned NEARDATA nocreate3 = STRANGE_OBJECT;
  1830. X  
  1831. X              while(obj->otyp == WAN_WISHING
  1832. X  #ifdef POLYSELF
  1833. X*** src/Old/uhitm.c    Sun Jun  3 14:16:32 1990
  1834. X--- src/uhitm.c    Mon May 28 15:48:55 1990
  1835. X***************
  1836. X*** 7,17 ****
  1837. X  #  include "artifact.h"
  1838. X  #endif
  1839. X  
  1840. X! static boolean hitum();
  1841. X  #ifdef POLYSELF
  1842. X! static boolean hmonas();
  1843. X  #endif
  1844. X! static void nohandglow();
  1845. X  
  1846. X  #ifdef WORM
  1847. X  extern boolean notonhead;
  1848. X--- 7,20 ----
  1849. X  #  include "artifact.h"
  1850. X  #endif
  1851. X  
  1852. X! static boolean FDECL(known_hitum, (struct monst *,int));
  1853. X! static boolean FDECL(hitum, (struct monst *,int));
  1854. X  #ifdef POLYSELF
  1855. X! static int FDECL(explum, (struct monst *,struct attack *));
  1856. X! static int FDECL(gulpum, (struct monst *,struct attack *));
  1857. X! static boolean FDECL(hmonas, (struct monst *,int));
  1858. X  #endif
  1859. X! static void FDECL(nohandglow, (struct monst *));
  1860. X  
  1861. X  #ifdef WORM
  1862. X  extern boolean notonhead;
  1863. X***************
  1864. X*** 26,32 ****
  1865. X  
  1866. X      mm.x = mon->mx;
  1867. X      mm.y = mon->my;
  1868. X!     enexto(&mm, mm.x, mm.y, mon->data);
  1869. X      if (MON_AT(mm.x, mm.y) || mon->mhp <= 1) return (struct monst *)0;
  1870. X      m2 = newmonst(0);
  1871. X      *m2 = *mon;            /* copy condition of old monster */
  1872. X--- 29,35 ----
  1873. X  
  1874. X      mm.x = mon->mx;
  1875. X      mm.y = mon->my;
  1876. X!     if (!enexto(&mm, mm.x, mm.y, mon->data)) return (struct monst *)0;
  1877. X      if (MON_AT(mm.x, mm.y) || mon->mhp <= 1) return (struct monst *)0;
  1878. X      m2 = newmonst(0);
  1879. X      *m2 = *mon;            /* copy condition of old monster */
  1880. X***************
  1881. X*** 64,70 ****
  1882. X      m2->mdispl = 0;
  1883. X      pmon(m2);    /* display the new monster */
  1884. X      place_monster(m2, m2->mx, m2->my);
  1885. X!     if (mon->mtame) (void) tamedog(m2, (struct obj *)0);
  1886. X      return m2;
  1887. X  }
  1888. X  
  1889. X--- 67,78 ----
  1890. X      m2->mdispl = 0;
  1891. X      pmon(m2);    /* display the new monster */
  1892. X      place_monster(m2, m2->mx, m2->my);
  1893. X!     if (mon->mtame) {
  1894. X!         struct monst *m3;
  1895. X! 
  1896. X!         if (m3 = tamedog(m2, (struct obj *)0))
  1897. X!         m2 = m3;
  1898. X!     }
  1899. X      return m2;
  1900. X  }
  1901. X  
  1902. X***************
  1903. X*** 81,87 ****
  1904. X  #ifdef MACOS
  1905. X              char mac_tbuf[80];
  1906. X              if(!flags.silent) SysBeep(1);
  1907. X!             sprintf(mac_tbuf, "Really attack %s?", mon_nam(mtmp));
  1908. X              if(UseMacAlertText(128, mac_tbuf) != 1) {
  1909. X  #else
  1910. X              pline("Really attack %s? ", mon_nam(mtmp));
  1911. X--- 89,95 ----
  1912. X  #ifdef MACOS
  1913. X              char mac_tbuf[80];
  1914. X              if(!flags.silent) SysBeep(1);
  1915. X!             Sprintf(mac_tbuf, "Really attack %s?", mon_nam(mtmp));
  1916. X              if(UseMacAlertText(128, mac_tbuf) != 1) {
  1917. X  #else
  1918. X              pline("Really attack %s? ", mon_nam(mtmp));
  1919. X***************
  1920. X*** 296,302 ****
  1921. X  struct monst *mon;
  1922. X  int tmp;
  1923. X  {
  1924. X!     static int malive;
  1925. X      boolean mhit = (tmp > rnd(20) || u.uswallow);
  1926. X  
  1927. X      malive = known_hitum(mon, mhit);
  1928. X--- 304,310 ----
  1929. X  struct monst *mon;
  1930. X  int tmp;
  1931. X  {
  1932. X!     static int NEARDATA malive;
  1933. X      boolean mhit = (tmp > rnd(20) || u.uswallow);
  1934. X  
  1935. X      malive = known_hitum(mon, mhit);
  1936. X***************
  1937. X*** 428,433 ****
  1938. X--- 436,442 ----
  1939. X              useup(obj);
  1940. X              hittxt = TRUE;
  1941. X              tmp = 1;
  1942. X+             break;
  1943. X  #endif
  1944. X          case EXPENSIVE_CAMERA:
  1945. X      You("succeed in destroying your camera.  Congratulations!");
  1946. X***************
  1947. X*** 445,451 ****
  1948. X                  kludge("%s turns to stone.", Monnam(mon));
  1949. X                  stoned = TRUE;
  1950. X                  xkilled(mon,0);
  1951. X!                 nohandglow();
  1952. X                  return(FALSE);
  1953. X              }
  1954. X              tmp = mons[obj->corpsenm].msize + 1;
  1955. X--- 454,460 ----
  1956. X                  kludge("%s turns to stone.", Monnam(mon));
  1957. X                  stoned = TRUE;
  1958. X                  xkilled(mon,0);
  1959. X!                 nohandglow(mon);
  1960. X                  return(FALSE);
  1961. X              }
  1962. X              tmp = mons[obj->corpsenm].msize + 1;
  1963. X***************
  1964. X*** 576,582 ****
  1965. X             /* && !destroyed  -- guaranteed by mhp > 1 */ ) {
  1966. X  
  1967. X          if (clone_mon(mon)) {
  1968. X!             pline("%s divides as you hit it!", Monnam(mon));
  1969. X              hittxt = TRUE;
  1970. X          }
  1971. X      }
  1972. X--- 585,591 ----
  1973. X             /* && !destroyed  -- guaranteed by mhp > 1 */ ) {
  1974. X  
  1975. X          if (clone_mon(mon)) {
  1976. X!             kludge("%s divides as you hit it!", Monnam(mon));
  1977. X              hittxt = TRUE;
  1978. X          }
  1979. X      }
  1980. X***************
  1981. X*** 602,614 ****
  1982. X      if (poiskilled) {
  1983. X          pline("The poison was deadly...");
  1984. X          xkilled(mon, 0);
  1985. X!         nohandglow();
  1986. X          return FALSE;
  1987. X      } else if (destroyed) {
  1988. X          killed(mon);    /* takes care of most messages */
  1989. X!         nohandglow();
  1990. X      } else if(u.umconf && !thrown) {
  1991. X!         nohandglow();
  1992. X          if(!resist(mon, '+', 0, NOTELL)) mon->mconf = 1;
  1993. X          if(!mon->mstun && mon->mcanmove && !mon->msleep &&
  1994. X             !Blind && mon->mconf)
  1995. X--- 611,623 ----
  1996. X      if (poiskilled) {
  1997. X          pline("The poison was deadly...");
  1998. X          xkilled(mon, 0);
  1999. X!         nohandglow(mon);
  2000. X          return FALSE;
  2001. X      } else if (destroyed) {
  2002. X          killed(mon);    /* takes care of most messages */
  2003. X!         nohandglow(mon);
  2004. X      } else if(u.umconf && !thrown) {
  2005. X!         nohandglow(mon);
  2006. X          if(!resist(mon, '+', 0, NOTELL)) mon->mconf = 1;
  2007. X          if(!mon->mstun && mon->mcanmove && !mon->msleep &&
  2008. X             !Blind && mon->mconf)
  2009. X***************
  2010. X*** 675,715 ****
  2011. X              if(thick_skinned(mdef->data)) tmp = 0;
  2012. X          break;
  2013. X          case AD_FIRE:
  2014. X  # ifdef GOLEMS
  2015. X!         golemeffects(mdef, AD_FIRE, tmp);
  2016. X  # endif /* GOLEMS */
  2017. X-         if(resists_fire(pd)) {
  2018. X              shieldeff(mdef->mx, mdef->my);
  2019. X              tmp = 0;
  2020. X-         } else {
  2021. X-             if(!Blind) pline("%s is on fire!", Monnam(mdef));
  2022. X-             tmp += destroy_mitem(mdef, SCROLL_SYM, AD_FIRE);
  2023. X-             tmp += destroy_mitem(mdef, POTION_SYM, AD_FIRE);
  2024. X- # ifdef SPELLS
  2025. X-             tmp += destroy_mitem(mdef, SPBOOK_SYM, AD_FIRE);
  2026. X- # endif
  2027. X          }
  2028. X          break;
  2029. X          case AD_COLD:
  2030. X! # ifdef GOLEMS
  2031. X!         golemeffects(mdef, AD_COLD, tmp);
  2032. X! # endif /* GOLEMS */
  2033. X          if(resists_cold(pd)) {
  2034. X              shieldeff(mdef->mx, mdef->my);
  2035. X              tmp = 0;
  2036. X-         } else {
  2037. X-             if(!Blind) pline("%s is covered in frost.", Monnam(mdef));
  2038. X-             tmp += destroy_mitem(mdef, POTION_SYM, AD_COLD);
  2039. X          }
  2040. X          break;
  2041. X          case AD_ELEC:
  2042. X  # ifdef GOLEMS
  2043. X!         golemeffects(mdef, AD_ELEC, tmp);
  2044. X  # endif /* GOLEMS */
  2045. X-         if(resists_elec(pd)) {
  2046. X              shieldeff(mdef->mx, mdef->my);
  2047. X              tmp = 0;
  2048. X          }
  2049. X          break;
  2050. X          case AD_ACID:
  2051. X          if(resists_acid(pd)) tmp = 0;
  2052. X--- 684,733 ----
  2053. X              if(thick_skinned(mdef->data)) tmp = 0;
  2054. X          break;
  2055. X          case AD_FIRE:
  2056. X+         if(!Blind) pline("%s is on fire!", Monnam(mdef));
  2057. X+         tmp += destroy_mitem(mdef, SCROLL_SYM, AD_FIRE);
  2058. X+ # ifdef SPELLS
  2059. X+         tmp += destroy_mitem(mdef, SPBOOK_SYM, AD_FIRE);
  2060. X+ # endif
  2061. X+         if(resists_fire(pd)) {
  2062. X+             if (!Blind)
  2063. X+             pline("The fire doesn't heat %s!", mon_nam(mdef));
  2064. X  # ifdef GOLEMS
  2065. X!             golemeffects(mdef, AD_FIRE, tmp);
  2066. X  # endif /* GOLEMS */
  2067. X              shieldeff(mdef->mx, mdef->my);
  2068. X              tmp = 0;
  2069. X          }
  2070. X+         /* only potions damage resistant players in destroy_item */
  2071. X+         tmp += destroy_mitem(mdef, POTION_SYM, AD_FIRE);
  2072. X          break;
  2073. X          case AD_COLD:
  2074. X!         if(!Blind) pline("%s is covered in frost!", Monnam(mdef));
  2075. X          if(resists_cold(pd)) {
  2076. X              shieldeff(mdef->mx, mdef->my);
  2077. X+             if (!Blind)
  2078. X+             pline("The frost doesn't chill %s!", mon_nam(mdef));
  2079. X+ # ifdef GOLEMS
  2080. X+             golemeffects(mdef, AD_COLD, tmp);
  2081. X+ # endif /* GOLEMS */
  2082. X              tmp = 0;
  2083. X          }
  2084. X+         tmp += destroy_mitem(mdef, POTION_SYM, AD_COLD);
  2085. X          break;
  2086. X          case AD_ELEC:
  2087. X+         if (!Blind) pline("%s is zapped!", Monnam(mdef));
  2088. X+         tmp += destroy_mitem(mdef, WAND_SYM, AD_ELEC);
  2089. X+         if(resists_elec(pd)) {
  2090. X+             if (!Blind)
  2091. X+             pline("The zap doesn't shock %s!", mon_nam(mdef));
  2092. X  # ifdef GOLEMS
  2093. X!             golemeffects(mdef, AD_ELEC, tmp);
  2094. X  # endif /* GOLEMS */
  2095. X              shieldeff(mdef->mx, mdef->my);
  2096. X              tmp = 0;
  2097. X          }
  2098. X+         /* only rings damage resistant players in destroy_item */
  2099. X+         tmp += destroy_mitem(mdef, RING_SYM, AD_ELEC);
  2100. X          break;
  2101. X          case AD_ACID:
  2102. X          if(resists_acid(pd)) tmp = 0;
  2103. X***************
  2104. X*** 1464,1472 ****
  2105. X  }
  2106. X  
  2107. X  static void
  2108. X! nohandglow()
  2109. X  {
  2110. X!     if (!u.umconf) return; /* for safety */
  2111. X      if (u.umconf == 1) {
  2112. X          if (Blind)
  2113. X              Your("%s stop tingling.", makeplural(body_part(HAND)));
  2114. X--- 1482,1491 ----
  2115. X  }
  2116. X  
  2117. X  static void
  2118. X! nohandglow(mon)
  2119. X! struct monst *mon;
  2120. X  {
  2121. X!     if (!u.umconf || mon->mconf) return;
  2122. X      if (u.umconf == 1) {
  2123. X          if (Blind)
  2124. X              Your("%s stop tingling.", makeplural(body_part(HAND)));
  2125. X*** src/Old/unixmain.c    Sun Jun  3 14:17:29 1990
  2126. X--- src/unixmain.c    Thu May 24 21:47:14 1990
  2127. X***************
  2128. X*** 21,27 ****
  2129. X  char *catmore = 0;                /* default pager */
  2130. X  #endif
  2131. X  
  2132. X! extern struct passwd *getpwuid();
  2133. X  #ifdef CHDIR
  2134. X  static void chdirx();
  2135. X  #endif /* CHDIR */
  2136. X--- 21,27 ----
  2137. X  char *catmore = 0;                /* default pager */
  2138. X  #endif
  2139. X  
  2140. X! extern struct passwd *getpwnam(), *getpwuid();
  2141. X  #ifdef CHDIR
  2142. X  static void chdirx();
  2143. X  #endif /* CHDIR */
  2144. X***************
  2145. X*** 32,38 ****
  2146. X  int argc;
  2147. X  char *argv[];
  2148. X  {
  2149. X-     struct passwd *pw;
  2150. X      extern int x_maze_max, y_maze_max;
  2151. X      register int fd;
  2152. X  #ifdef CHDIR
  2153. X--- 32,37 ----
  2154. X***************
  2155. X*** 72,78 ****
  2156. X  #endif
  2157. X      if(argc > 1) {
  2158. X  #ifdef CHDIR
  2159. X!         if (!strncmp(argv[1], "-d", 2)) {
  2160. X          argc--;
  2161. X          argv++;
  2162. X          dir = argv[0]+2;
  2163. X--- 71,80 ----
  2164. X  #endif
  2165. X      if(argc > 1) {
  2166. X  #ifdef CHDIR
  2167. X!         if (!strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
  2168. X!         /* avoid matching "-dec" for DECgraphics; since the man page
  2169. X!          * says -d directory, hope nobody's using -desomething_else
  2170. X!          */
  2171. X          argc--;
  2172. X          argv++;
  2173. X          dir = argv[0]+2;
  2174. X***************
  2175. X*** 110,115 ****
  2176. X--- 112,120 ----
  2177. X      u.uhp = 1;    /* prevent RIP on early quits */
  2178. X      u.ux = FAR;    /* prevent nscr() */
  2179. X      (void) signal(SIGHUP, (SIG_RET_TYPE) hangup);
  2180. X+ #ifdef SIGXCPU
  2181. X+     (void) signal(SIGXCPU, (SIG_RET_TYPE) hangup);
  2182. X+ #endif
  2183. X  
  2184. X      /*
  2185. X       * Find the creation date of this game,
  2186. X***************
  2187. X*** 137,146 ****
  2188. X  # endif
  2189. X          case 'D':
  2190. X  # ifdef WIZARD
  2191. X!             pw = getpwuid(getuid());
  2192. X!             if(!strcmp(pw->pw_name, WIZARD)) {
  2193. X!                 wizard = TRUE;
  2194. X!                 break;
  2195. X              }
  2196. X              /* otherwise fall thru to discover */
  2197. X  # endif
  2198. X--- 142,172 ----
  2199. X  # endif
  2200. X          case 'D':
  2201. X  # ifdef WIZARD
  2202. X!             {
  2203. X!               char *user;
  2204. X!               int uid;
  2205. X!               struct passwd *pw = (struct passwd *)0;
  2206. X! 
  2207. X!               uid = getuid();
  2208. X!               user = getlogin();
  2209. X!               if (user) {
  2210. X!                   pw = getpwnam(user);
  2211. X!                   if (pw && (pw->pw_uid != uid)) pw = 0;
  2212. X!               }
  2213. X!               if (pw == 0) {
  2214. X!                   user = getenv("USER");
  2215. X!                   if (user) {
  2216. X!                   pw = getpwnam(user);
  2217. X!                   if (pw && (pw->pw_uid != uid)) pw = 0;
  2218. X!                   }
  2219. X!                   if (pw == 0) {
  2220. X!                   pw = getpwuid(uid);
  2221. X!                   }
  2222. X!               }
  2223. X!               if (pw && !strcmp(pw->pw_name,WIZARD)) {
  2224. X!                   wizard = TRUE;
  2225. X!                   break;
  2226. X!               }
  2227. X              }
  2228. X              /* otherwise fall thru to discover */
  2229. X  # endif
  2230. X***************
  2231. X*** 164,169 ****
  2232. X--- 190,201 ----
  2233. X                (void) strncpy(plname, argv[0], sizeof(plname)-1);
  2234. X              } else
  2235. X                  Printf("Player name expected after -u\n");
  2236. X+             break;
  2237. X+         case 'i':
  2238. X+             if(!strcmp(argv[0]+1, "ibm")) assign_ibm_graphics();
  2239. X+             break;
  2240. X+         case 'd':
  2241. X+             if(!strcmp(argv[0]+1, "dec")) assign_dec_graphics();
  2242. X              break;
  2243. X          default:
  2244. X              /* allow -T for Tourist, etc. */
  2245. X
  2246. END_OF_FILE
  2247. if test 52966 -ne `wc -c <'patch8.08'`; then
  2248.     echo shar: \"'patch8.08'\" unpacked with wrong size!
  2249. fi
  2250. # end of 'patch8.08'
  2251. fi
  2252. echo shar: End of archive 5 \(of 24\).
  2253. cp /dev/null ark5isdone
  2254. MISSING=""
  2255. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
  2256.     if test ! -f ark${I}isdone ; then
  2257.     MISSING="${MISSING} ${I}"
  2258.     fi
  2259. done
  2260. if test "${MISSING}" = "" ; then
  2261.     echo You have unpacked all 24 archives.
  2262.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2263. else
  2264.     echo You still need to unpack the following archives:
  2265.     echo "        " ${MISSING}
  2266. fi
  2267. ##  End of shell archive.
  2268. exit 0
  2269.